<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}" rel="stylesheet" type="text/css">

<div class="pageContent" id="jGridForDefectType"></div>

<script type="text/javascript">
    DWZ.context().find('#jGridForDefectType').jGrid({
        layoutH: 135,
        base: '${rc.getContextPath()}/manage/defectType/',
        url: 'selectDefectTypeList',
        columns: [
            {field: 'defectTypeCode', group: 'ids', type: 'checkbox', width: 22},
            {field: '_index', text: '<@label key="serialNumber.C">序号</@label>', width: 40},
            {field: 'defectTypeCode', text: '<@label key="defectTypeCode.C">缺陷类型编号</@label>', width: 100, query: true},
            {field: 'defectTypeText', text: '<@label key="defectTypeText.C">缺陷类型描述</@label>', width: 100, query: true},
            {field: 'lockFlag', text: '<@label key="lockFlag.C">锁定标记</@label>', width: 50, transform: function(data){
                if (data == 0) {
                    return '<@label    key="no.C">否</@label>';
                } else if (data == 1) {
                    return '<@label    key="yes.C">是</@label>';
                }
            }, query: true, queryType: 'select', queryOptions: [
                {value: '', label: '<@label key="all.C">所有</@label>'},
                {value: 0, label: '<@label key="no.C">否</@label>'},
                {value: 1, label: '<@label key="yes.C">是</@label>'}
            ]},
            {field: 'createUser', text: '<@label key="createUser.C">创建人</@label>', width: 100},
            {field: 'createDateTime', type: 'date', format: 'yyyy-MM-dd HH:mm:ss', text: '<@label key="createDateTime.C">创建时间</@label>', width: 100},
            {field: 'modifyUser', text: '<@label key="modifyUser.C">修改人</@label>', width: 100},
            {field: 'modifyDateTime', type: 'date', format: 'yyyy-MM-dd HH:mm:ss', text: '<@label key="modifyDateTime.C">修改时间</@label>', width: 100}
        ],
        gridbars: [
            {icon: 'add', text: '<@label key="add.B">新增</@label>', title: '<@label key="adddefectType.D">新增缺陷类型</@label>', 
                target: 'dialog', href: 'addDefectType', data: {navTabId: "${navTabId!''}"}, mask: true, width: 480, height: 220, rel: '', 
                menuCode: "defectType_add"},
            {icon: 'edit', text: '<@label key="edit.B">编辑</@label>', title: "<@label key='editDefectType.D'>编辑缺陷类型</@label>", 
                target: 'dialog', href: 'modifyDefectType', data: {id: '{defectTypeCode}', navTabId: '${navTabId!""}'}, mask: true, width: 580, height: 300, rel: '', callback: $.noop,
                menuCode: "defectType_edit"},
            {icon: 'icon', text: '<@label key="view.B">详情</@label>', title: "<@label key='viewDefectType.D'>缺陷类型详情</@label>", 
                target: 'dialog', href: 'viewDefectType', data: {id: '{defectTypeCode}', navTabId: '${navTabId!""}'}, mask: true, width: 580, height: 300, rel: '', callback: $.noop,
                menuCode: "defectType_view"},
            {icon: 'delete', text: '<@label key="delete.B">删除</@label>', title: "<@label key='confirmDelDefectType.M'>确认要删除选择的缺陷类型吗？</@label>", 
                target: 'selectedTodo', href: 'deleteDefectType', data: {ids: '{ids}', navTabId: '${navTabId!""}'},
                menuCode: "defectType_del"}
        ]
    });
</script>